from selenium import webdriver
import unittest
from selenium.webdriver.common.by import By
from time import sleep
from Day18.Page3 import test_page3
from Day18.Base import Base
class TestCase(unittest.TestCase):

    def setUp(self):
        self.driver = webdriver.Edge()
        self.driver.maximize_window()

    def tearDown(self):
        sleep(5)
        self.driver.quit()

    # def test_logins(self):
    #     po = Page(self.driver)
    #     po.test_LuoJi_DouBan()
    def test_04(self):
        po=test_page3(self.driver)
        po.login()
        po.bindSub()
        sleep(2)
        ele=po.find_element(By.XPATH)
        dy1=self.driver.find_element(By.XPATH,'/html/body/div[6]/div/div[2]/div[2]/div[2]/a').text
        self.assertEqual('国台旗舰店',dy1)

        dy3=self.driver.find_element(By.XPATH,'/html/body/div[5]/div[2]/div[2]/div[1]/h1')
        print(dy3)
        self.assertEqual('53°国台品鉴  500ml',dy3)


if __name__ == '__main__':
    unittest.main()

